Function Reference

_IETableGetCollection

Returns a collection object variable representing all the tables in a document.

#include <IE.au3>
_IETableGetCollection ( ByRef $o_object [, $i_index = -1] )

 

Parameters

$o_object Object variable of an InternetExplorer.Application, Window or Frame object
$i_index Optional: specifies whether to return a collection or indexed instance
0 or positive integer returns an indexed instance
-1 = (Default) returns a collection

 

Return Value

Success: Returns an object collection of all tables in the document, @EXTENDED = table count
Failure: Returns 0 and sets @ERROR
@Error: 0 ($_IEStatus_Success) = No Error
3 ($_IEStatus_InvalidDataType) = Invalid Data Type
5 ($_IEStatus_InvalidValue) = Invalid Value
7 ($_IEStatus_NoMatch) = No Match
@Extended: Contains invalid parameter number

 

Remarks

None.

 

Related

None.

 

Example


; *******************************************************
; Example 1 - Open a browser with the table example, get a reference to the first table
;               on the page (index 0) and read its contents into a 2-D array
; *******************************************************
;
#include <IE.au3>
$oIE = _IE_Example ("table")
$oTable = _IETableGetCollection ($oIE, 0)
$aTableData = _IETableWriteToArray ($oTable)

; *******************************************************
; Example 2 - Open a browser with the table example, get a reference to the
;               table collection and display the number of tables on the page
; *******************************************************
;
#include <IE.au3>
$oIE = _IE_Example ("table")
$oTable = _IETableGetCollection ($oIE)
$iNumTables = @extended
MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page")